<?php
// Test of the limits of the Cubie construct
require_once 'PHPUnit/Extensions/ExceptionTestCase.php';
jClasses::inc('cube~Center');

class UTCenter extends PHPUnit_Extensions_ExceptionTestCase
{
    public function testConstructOK() 
    {
        try 
        {
            $myCenter = new Center(1);
        }
        catch (Exception $e) {$this->fail();}
    }

    public function testConstructKO1()
    {
        $this->setExpectedException('Exception');
        $myCenter = new Center(Center::MAX_CENTER + 1);
    }

    public function testConstructKO2()
    {
        $this->setExpectedException('Exception');
        $myCenter = new Center(-1);
    }

    public function testConstructKO3()
    {
        $this->setExpectedException('Exception');
        $myCenter = new Center("stupid param");
    }
}
?>
